package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.AboutYct;
import com.ruoyi.system.service.IAboutYctService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 缘赐堂的官网的接口 关于缘赐堂
 */
@Api(value = "官网-关于缘赐堂查询",tags = "官网-关于缘赐堂查询",description = "官网-关于缘赐堂查询")
@Controller
@RequestMapping("/yct/about_yct")
public class AboutYctWebController extends BaseController {

	@Autowired
	private IAboutYctService aboutYctService;

	/**
	 * 关于缘赐堂通过id查询
	 * @param id
	 * @return
	 */
	@ApiOperation(value = "关于缘赐堂通过id查询",notes = "关于缘赐堂通过id查询")
	@ResponseBody
	@GetMapping("selectById")
	public AjaxResult selectById(Long id)
	{

		AboutYct aboutYct = aboutYctService.selectAboutYctById(id);
		return AjaxResult.success(aboutYct);
	}

	/**
	 * 关于缘赐堂列表查询
	 * @return
	 */
	@ApiOperation(value = "关于缘赐堂列表查询",notes = "关于缘赐堂列表查询")
	@ResponseBody
	@GetMapping("/selectList")
	public TableDataInfo list()
	{
		startPage();
		List<AboutYct> aboutYcts = aboutYctService.selectAboutYctList(null);
		return getDataTable(aboutYcts);
	}
}
